import 'package:fusion_one/dtos/stsToken.dart';
import 'package:fusion_one/dtos/token.dart';
import 'package:fusion_one/redux/actions/ossAction.dart';
import 'package:redux/redux.dart';

// 使用 combineReducers 避免写 switch-case
// TypedReducer 的作用就是将 Function 与 Action 关联
final ossConfigReducer = combineReducers<OSSConfig?>([
  TypedReducer<OSSConfig?, SetOSSConfigAction>(_setOssConfig),
]);

OSSConfig _setOssConfig(OSSConfig? config, SetOSSConfigAction action) {
  config = action.ossConfig;
  return config;
}
